<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的扩展</title>
    <script>

        let user = {
            name:"刘德华",
            age:50
        }

        let student = {
            id:10086,
            name:"张学友",
            address:"航都路18号"
        }

        let teacher = {
            name:"哈哈",
            car:"BMW"
        }

        //把后续的所有的对象的内容对应属性赋值给第一个对象，如果某个属性不存在，会把属性以及值一起复制过来
        Object.assign(user,student,teacher);


        console.log(user);
        console.log("======================")
        console.log(student);
        console.log("=======================")
        console.log(teacher);






    </script>
</head>
<body>

</body>
</html>